<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <!-- uc强制竖屏 -->
    <meta name="screen-orientation" content="portrait">
    <!-- QQ强制竖屏 -->
    <meta name="x5-orientation" content="portrait">
    <meta name="description" content="{{\App\Setting::getConfig('description','SEO优化')}}">
    <meta name="author" content="河南坚磐电子科技有限公司">
    <meta name="keywords" content="{{\App\Setting::getConfig('keywords','SEO优化')}}" />
    <link href="{{\App\Setting::getConfig('icon')}}" rel="icon"/>
    <title>{{\App\Setting::getConfig('title')}}-@yield('title')</title>

    <!-- 基本css和js -->
    <script src="/code/js/jquery-1.8.3.min.js"></script>
    <script src="/code/js/mui.min.js"></script>
    <link href="/code/css/mui.min.css" rel="stylesheet" />

    @yield('head')
        @php
    $agent = strtolower($_SERVER['HTTP_USER_AGENT']);
     $iphone = (strpos($agent, 'iphone')) ? true : false;
        @endphp
        @if($iphone)
            <style>
            header.mui-bar {
            box-shadow: none !important;
            z-index: 2000;
            padding-top: 16px;
        }
        .mui-bar {
            height: 60px;
            background-color: #fff;
            max-width: 720px;
            margin: 0 auto;
            box-shadow: none;
        }
        .scroll-special {
            padding-top: 61px;
            padding-bottom: 50px;
        }
		.mui-bar-nav~.mui-content{
			padding-top:60px
		}
		.find_nav{
            position: fixed;
            top: 60px;
            max-width: 720px;
            left: 0;
            right: 0;
            height: 45px;
            background-color: #fff;
            display: -moz-box;
            display: -webkit-box;
            display: box;
            border-bottom: 1px solid #369acc;
            margin: 0 auto;
            z-index: 1000;
		}
        </style>

        @endif
</head>

<body @yield('body-attr')>
@yield('content')
</body>
<script>
    function  aOfApp(href,top) {
        if(top===true){

            try{
                window.webkit.messageHandlers.Sign.postMessage({body:'istop,1'});
            }catch(e){
                window.android.startSign(1);
            }
        }else{
            try{
                window.webkit.messageHandlers.Sign.postMessage({body:'istop,2'});
            }catch(e){
                window.android.startSign(2);
            }

        }
        if(href=='history.back()'){
            history.back();
        }else{
            location.href=href;
        }
    }
    function share (href,title,thumb,digest) {

        try{
            window.webkit.messageHandlers.Share.postMessage({body:'title,'+title+',href,'+href+',thumb,'+thumb+',digest,'+digest});
        }catch(e){
            window.android.startShare(href,title,thumb,digest);
        }
    }
    function downloads (url) {
        try{
            window.webkit.messageHandlers.download.postMessage({body:'url,'+url});
        }catch(e){
            window.android.startdownload(url);
        }
    }
</script>
@if($iphone)
	<script>
		a=document.documentElement.clientHeight;
		var obj=document.getElementsByClassName('mui-bar')[0];
		var left=document.getElementsByClassName('return')[0];
		if(a==812){
//			obj.style.height=64+"px";
//			left.style.top=20+"px";
            var head = document.getElementsByTagName('head')[0];
            var link = document.createElement('link');
            link.href = '{{asset('code/css/iphoneX.css')}}';
            link.rel = 'stylesheet';
            link.type = 'text/css';
            head.appendChild(link);
		}
	</script>
@endif
@yield('foot')
</html>